FROM openjdk:8
# 作者
MAINTAINER qudan  <quqdan.com>
# 健康检查参数设置
HEALTHCHECK --interval=30s --timeout=2s --retries=3 \
  CMD curl --silent --fail localhost:8083/qw/init/health-check || exit 1
RUN bash -c 'mkdir -p /tmp'
# 时区
RUN echo "Asia/Shanghai" > /etc/timezone
# 定义jvm参数变量
ENV JAVA_OPTS=""
# 指定运行配置文件环境
ENV ACTIVE=""
# 运行工作目录
WORKDIR /jar
# VOLUME /tmp
COPY ./target/quwan.jar quwan.jar
ENTRYPOINT java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar quwan.jar --spring.profiles.active=${ACTIVE}
#ENTRYPOINT ["java","-jar","/tmp/quwan.jar"]